<!DOCTYPE html><html><head>
<title>map::geocode::nominatim - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'map_geocode_nominatim.man' by tcllib/doctools with format 'html'
   -->
<!-- map::geocode::nominatim.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::geocode::nominatim(n) 0.1 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::geocode::nominatim - Resolving geographical names with a Nominatim service</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Options</a></li>
<li class="doctools_subsection"><a href="#subsection2">Methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">http</b></li>
<li>package require <b class="pkgname">json</b></li>
<li>package require <b class="pkgname">uri</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">map::geocode::nominatim <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::map::geocode::nominatim</b> <i class="arg">requestor</i> <span class="opt">?<b class="option">-baseurl</b> <i class="arg">url</i>?</span> <span class="opt">?<b class="option">-callback</b> <i class="arg">callback</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">error callback</i>?</span></a></li>
<li><a href="#2"><b class="cmd">$cmdprefix</b> <i class="arg">result</i></a></li>
<li><a href="#3"><b class="cmd">$cmdprefix</b> <i class="arg">errorstring</i></a></li>
<li><a href="#4"><i class="arg">requestor</i> <b class="method">search</b> <i class="arg">query</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for accessing geocoding services which implement
the <i class="term"><a href="../../../../index.html#nominatim">Nominatim</a></i> interface (see <span class="sectref"><a href="#section3">References</a></span>)</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::map::geocode::nominatim</b> <i class="arg">requestor</i> <span class="opt">?<b class="option">-baseurl</b> <i class="arg">url</i>?</span> <span class="opt">?<b class="option">-callback</b> <i class="arg">callback</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">error callback</i>?</span></a></dt>
<dd><p>Creates a geocoding request object <i class="arg">requestor</i>, which will send its requests to
the <i class="term"><a href="../../../../index.html#nominatim">Nominatim</a></i> server.</p>
<p>The result of the command is <i class="arg">name</i>.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Options</a></h3>
<dl class="doctools_options">
<dt><b class="option">-baseurl</b> <i class="arg">url</i></dt>
<dd><p>The base URL of the <i class="term"><a href="../../../../index.html#nominatim">Nominatim</a></i> service. Default value is <i class="term">OpenStreetMap's</i> service at
<a href="http://nominatim.openstreetmap.org/search">http://nominatim.openstreetmap.org/search</a> A possible free alternative is at
<a href="http://open.mapquestapi.com//nominatim/v1/search">http://open.mapquestapi.com//nominatim/v1/search</a></p></dd>
<dt><b class="option">-callback</b> <i class="arg">cmdprefix</i></dt>
<dd><p>A command prefix to be invoked when search result become available.
The default setting, active when nothing was specified on object creation, is to print
the <i class="arg">result</i> (see below) to <i class="term"><a href="../../../../index.html#stdout">stdout</a></i>. The result of the command prefix is
ignored. Errors thrown by the command prefix are caught and cause the invokation of
the error callback (see option <b class="option">-error</b> below), with the error message as argument.</p>
<p>The signature of the command prefix is:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">$cmdprefix</b> <i class="arg">result</i></a></dt>
<dd><p>The <i class="arg">result</i> is a list of dictionaries, containing one item per hit.
Each dictionary will have the following entries:</p>
<dl class="doctools_definitions">
<dt>place_id</dt>
<dd><p>The place ID (FIXME: what's this?)</p></dd>
<dt>licence</dt>
<dd><p>The data licence string</p></dd>
<dt>osm_type</dt>
<dd><p>The OSM type of the location</p></dd>
<dt>osm_id</dt>
<dd><p>FIXME</p></dd>
<dt>boundingbox</dt>
<dd><p>The coordinates of the bounding box (min and max latitude, min and max longitude)</p></dd>
<dt>lat</dt>
<dd><p>The location's latitude</p></dd>
<dt>lon</dt>
<dd><p>The location's longitude</p></dd>
<dt>display_name</dt>
<dd><p>the location's human readable name</p></dd>
<dt>class</dt>
<dd><p>FIXME</p></dd>
<dt>type</dt>
<dd><p>FIXME</p></dd>
<dt>icon</dt>
<dd><p>FIXME</p></dd>
</dl></dd>
</dl></dd>
<dt><b class="option">-error</b> <i class="arg">cmdprefix</i></dt>
<dd><p>A command prefix to be invoked when encountering errors. Typically these are HTTP errors.
The default setting, active when nothing was specified on object creation, is to print
the <i class="arg">errorstring</i> (see below) to <i class="term">stderr</i>. The result of the command prefix is
ignored. Errors thrown by the command prefix are passed to higher levels.</p>
<p>The signature of the command prefix is:</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">$cmdprefix</b> <i class="arg">errorstring</i></a></dt>
<dd></dd>
</dl></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="4"><i class="arg">requestor</i> <b class="method">search</b> <i class="arg">query</i></a></dt>
<dd><p>This method returns a list of dictionaries, one item per hit for the specified <i class="arg">query</i>.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Nominatim">http://wiki.openstreetmap.org/wiki/Nominatim</a></p></li>
<li><p><a href="http://open.mapquestapi.com/nominatim/">http://open.mapquestapi.com/nominatim/</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#geocoding">geocoding</a>, <a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#location">location</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#nominatim">nominatim</a>, <a href="../../../../index.html#server">server</a>, <a href="../../../../index.html#url">url</a></p>
</div>
</div></body></html>
